From 0755cf92a153a566e89e700505bba1a3bd5993d6 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Wed, 5 Oct 2011 13:15:44 +0000 Subject: [PATCH] Fix bug in r83814 reported on IRC: categorymembers did not set an ORDER BY when cmcontinue was set, which broke paging when cmdir=desc was used. --- includes/api/ApiQueryCategoryMembers.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/api/ApiQueryCategoryMembers.php b/includes/api/ApiQueryCategoryMembers.php index c1871a5b41..cdbc29a5dd 100644 --- a/includes/api/ApiQueryCategoryMembers.php +++ b/includes/api/ApiQueryCategoryMembers.php @@ -143,7 +143,9 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase { $contWhere = "cl_sortkey $op $escSortkey OR " . "(cl_sortkey = $escSortkey AND " . "cl_from $op= $from)"; - + // The below produces ORDER BY cl_sortkey, cl_from, possibly with DESC added to each of them + $this->addWhereRange( 'cl_sortkey', $dir, null, null ); + $this->addWhereRange( 'cl_from', $dir, null, null ); } else { // The below produces ORDER BY cl_sortkey, cl_from, possibly with DESC added to each of them $this->addWhereRange( 'cl_sortkey', -- 2.20.1